Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move cli to extra file, macOS tests add documentation #501

Merged
merged 13 commits into from
Jan 1, 2025

Conversation

michaelfeil
Copy link
Owner

Related Issue

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Add any other context about the PR here.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR makes significant changes to documentation and CLI functionality in the Infinity project. Here's a concise summary of the key changes:

  • Introduces new CLI architecture in cli.py with v2 command supporting multiple model loading and enhanced configuration options
  • Moves CLI-related code from infinity_server.py to dedicated cli.py module for better separation of concerns
  • Adds documentation for batch handling and caching mechanisms, though some docstrings remain incomplete
  • Problematically removes entire contents of docs/docs/index.md without replacement, losing critical user documentation
  • Adds test coverage for new CLI functionality with parameterized tests for both v1 and v2 commands

Key concerns:

  • Complete removal of index.md documentation needs to be addressed
  • Incomplete docstrings in caching layer need completion
  • No clear documentation for nomic-ai/nomic-embed-text-v1.5 support mentioned in issue Support for nomic-ai/nomic-embed-text-v1.5 #123
  • Caching implementation may have thread safety issues that should be reviewed
  • CLI tests are skipped on Windows platform

8 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

docs/docs/contribution.md Outdated Show resolved Hide resolved
```bash
cd libs/infinity_emb
make precommit
```

## CLA
Infinity is developed as open source project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: consider rephrasing to 'Infinity is an open source project' for better clarity

libs/infinity_emb/infinity_emb/cli.py Outdated Show resolved Hide resolved
libs/infinity_emb/infinity_emb/cli.py Outdated Show resolved Hide resolved
"""Infinity API ♾️ cli v2. MIT License. Copyright (c) 2023-now Michael Feil \n
\n
Multiple Model CLI Playbook: \n
- 1. cli options can be overloaded i.e. `v2 --model-id model/id1 --model-id/id2 --batch-size 8 --batch-size 4` \n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: incorrect example in docs: --model-id/id2 should be --model-id model/id2

trust_remote_code=trust_remote_code,
engine=engine,
model_warmup=model_warmup,
vector_disk_cache_path=vector_disk_cache,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: incorrect parameter name: vector_disk_cache_path should be vector_disk_cache to match the input parameter name

Comment on lines 25 to 28
"""wrapper around DiskCache. The Diskcache in infinity `races` against the model inference.

The concept is that with the code be
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: Docstring is incomplete and unclear. The sentence 'The concept is that with the code be' is unfinished. Please complete the explanation of how the cache races against model inference.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 81.70732% with 15 lines in your changes missing coverage. Please review.

Project coverage is 80.06%. Comparing base (944643b) to head (350f9d8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
libs/infinity_emb/infinity_emb/cli.py 81.48% 15 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
+ Coverage   79.98%   80.06%   +0.08%     
==========================================
  Files          42       43       +1     
  Lines        3467     3471       +4     
==========================================
+ Hits         2773     2779       +6     
+ Misses        694      692       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil changed the title add documentation move cli to extra file, add documentation Dec 31, 2024
@michaelfeil michaelfeil changed the title move cli to extra file, add documentation move cli to extra file, macOS tests add documentation Dec 31, 2024
@michaelfeil michaelfeil merged commit 2ed3884 into main Jan 1, 2025
36 checks passed
@michaelfeil michaelfeil deleted the add-documentation branch January 1, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants